﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Csla;

namespace CslaHispano.EncapsulatedInvoke.Domain.Entities
{
    [Serializable()]
    public class ModuleOptions : BusinessListBase<ModuleOptions, OptionEdit>
    {

        #region Data Portal

        private void Child_Fetch(string idSystem)
        {
            //var dal = IoCFactory.Instance.CurrentContainer.Resolve<IModuleOptionRepository>();
        
            //var data = dal.Fetch(idSystem);
            //var rlce = RaiseListChangedEvents;
            //RaiseListChangedEvents = false;
            //while (data.Read())
            //    Add(DataPortal.FetchChild<OptionEdit>(data));
            //RaiseListChangedEvents = rlce;
        }
        #endregion

        #region Constructor

        private ModuleOptions()
        {
            AllowNew = true;
            AllowEdit = true;
            AllowRemove = true;
        }

        #endregion

        #region Factory Methods

        protected override OptionEdit AddNewCore()
        {
            OptionEdit _item = OptionEdit.NewOptionEdit();
            this.Add(_item);
            return _item;
        }
        #endregion
    }
}
